package com.hzqy.persistence.dao.cast;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.CmCastVo;

@Repository
public class CastDao extends PersistenceDao<CmCastVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());

	public List<CmCastVo> selectCastList(Map<String,Object> map) {
		return getSqlSession().selectList(this.getNamespace() + "selectCastList", map);
	}

	public int insertCast(CmCastVo cmCastVo) {
		return getSqlSession().insert(this.getNamespace() + "insertCast", cmCastVo);
	}

	public int updateCast(CmCastVo cmCastVo) {
		return getSqlSession().update(this.getNamespace() + "updateCast", cmCastVo);
	}

	public Integer findCastCount(CmCastVo cmCastVo) {
		return getSqlSession().selectOne(this.getNamespace() + "findCastCount", cmCastVo);
	}

	public int deleteCast(int f_cast_id) {
		return getSqlSession().update(this.getNamespace() + "deleteCast", f_cast_id);
	}

	public CmCastVo selectCastVo(int f_cast_id) {
		return getSqlSession().selectOne(this.getNamespace() + "selectCastVo", f_cast_id);
	}
}
